<?php

class Miniatura_Model extends Model {
	
	public function select($codigo) {
		$stmt = $this->db->prepare("SELECT m.*,c.cat_nome FROM miniaturas AS m 
		INNER JOIN categorias AS c ON m.id_categoria=c.id WHERE codigo='$codigo'");
		$rs = $stmt->execute();
		$row = $stmt->fetchAll(PDO::FETCH_OBJ);
		return $row;
	}
}

?>